//
//  ViewController.swift
//  1.3.Displaying Images with UIImageView
//
//  Created by joker on 15/7/21.
//  Copyright (c) 2015年 joker. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    let image = UIImage(named: "Safari")
    var imageView : UIImageView!
    
//    required init(coder aDecoder: NSCoder){
//        imageView = UIImageView(image: image)
//        super.init(coder: aDecoder)
//    }
    
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        imageView = UIImageView(frame: view.bounds)
        imageView.image = image
        imageView.center = view.center
        imageView.contentMode = .ScaleAspectFit
        view.addSubview(imageView)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

